﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace com_excel
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            List<Excel_Data> list = new List<Excel_Data>();
            List<Excel_Data> list1 = new List<Excel_Data>();
            List<Excel_Data> list2 = new List<Excel_Data>();
            list.Add(new Excel_Data()
            {
                CtrlRegAddr = "1",
                CtrlDataType = "2",
                CtrlRegOffset = "3",
                CtrlByteOffset = "4",
                CtrlValue = "5",
                CtrlExplain = "6"
            });
            list.Add(new Excel_Data()
            {
                CtrlRegAddr = "1",
                CtrlDataType = "2",
                CtrlRegOffset = "3",
                CtrlByteOffset = "4",
                CtrlValue = "5",
                CtrlExplain = "6"
            });
            list.Add(new Excel_Data()
            {
                CtrlRegAddr = "1",
                CtrlDataType = "2",
                CtrlRegOffset = "3",
                CtrlByteOffset = "4",
                CtrlValue = "5",
                CtrlExplain = "6"
            });

            Ctrl_Grid.ItemsSource = list;

        }

        private void bt_ClearRecv_Click(object sender, RoutedEventArgs e)
        {

        }

        private void bt_ReadAll_Click(object sender, RoutedEventArgs e)
        {

        }

        private void bt_WriteSelect_Click(object sender, RoutedEventArgs e)
        {

        }

        private void bt_SerialSwitch_Click(object sender, RoutedEventArgs e)
        {

        }

        private void bt_SelectExcel_Click(object sender, RoutedEventArgs e)
        {

        }

        private void CheckBox_Checked(object sender, RoutedEventArgs e)
        {

        }
    }
    public class Excel_Data
    {
        public string CtrlRegAddr { get; set; }
        public string CtrlDataType { get; set; }
        public string CtrlRegOffset { get; set; }
        public string CtrlByteOffset { get; set; }
        public string CtrlValue { get; set; }
        public string CtrlExplain { get; set; }

    }
}
